%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Iteration 8
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Iteration 8: SAB App Functionality (M1)}

In the eighth iteration we will not decompose an existing component, but add an intermediate component to encapsulate functionalities. The module we add is the \emph{SAB App Functionality} that encapsulates common functionalities between current and future SAB applications (i.e. SAB Online, SAB Mobile, ATM System). This iteration is driven by the M1: "SAB Mobile modifiability" driver. With this driver we encapsulate common application functionalities and prepare the system for extension with new applications like SAB Mobile.

Use cases that were previously handled but where this iteration has effect on are:
\begin{itemize}
 \item UC5: Consult bank account overview
 \item UC6: Consult transaction history of account
 \item UC9: Issue transfer between two accounts
 \item UC10: Set up standing order
 \item UC12: Cancel standing order
\end{itemize}

These drivers can be summarized in the following requirements:
\begin{itemize}
 \item SAB wants to provide a mobile application called SAB Mobile in the future.
 \item SAB Mobile will provide a subset of the SAB Online functionality.
 \item SAB Mobile will have ability to store common beneficiaries in a "contact list". This contact list will only be manageable by SAB Online.
\end{itemize}



To satisfy these drivers we considered different modifiability tactics to find an appropriate solution:
\begin{description}

    % Tactic problem
    \item[Localize Modifications:] \hfill \\
    
        \vspace{-5mm} 
        \begin{description}
            % solutions for problem
            \item[Maintain semantic coherence:] The common services of SAB applications can be abstracted using a specialized module.
            
            \item[Anticipate expected changes:] This addition is made with future addition of SAB applications like SAB mobile in mind.
        \end{description}

        
        
    % Tactic problem
    \item[Prevent ripple effects:] \hfill \\
    
        \vspace{-5mm} 
        \begin{description}
            % solutions for problem
            \item[Hide information:] Information hiding by isolating specific interfaces helps to prevent ripple effects by enabling modular design.
            
            \item[Maintain existing interfaces:] Abstract interfaces can be provided to mask variations.
            
            \item[Use an intermediary:] An intermediary can be used to encapsulate and group specific functionalities. This way ripple effects can be prevented.
            
            \item[Restrict communication paths:] Communication paths from current and future SAB applications to internal SAB components can be reduced by encapsulating them by common requirements.
        \end{description}
   
        
        

    % Tactic problem
    \item[Defer binding time:] \hfill \\
    
        \vspace{-5mm} 
        \begin{description}
            % solutions for problem
            \item[Runtime registration:] The distributed design requires interacting components to register with each other. The components can run on separate computers and can communicate even over a wide area network.
            
            \item[Component replacement:] New components can be added easily through runtime registration.
        \end{description}
        
\end{description}





% Insert figure
\begin{figure}[!ht]
    \centering
        \includegraphics[width=0.7\textwidth]{images/It8_M1_componentdiag.png}
    \caption{Component diagram after iteration 8.}
    \label{fig:It8_M1_componentdiag}
\end{figure}



    
    

To incorporate the drivers and to anticipate expected changes we chose to add the \emph{SAB App Functionality} component [figure \ref{fig:It8_M1_componentdiag}]. This component is an implementation of the Microkernel pattern that acts as an intermediary. This Microkernel can delegate subsets of the functionalities to the needed systems. \emph{SAB App Functionality} is connected to the \emph{Login Module} to provide the login functionalities, it is connected to the \emph{Standing Order Module} to allow for issuing and canceling standing orders by SAB Online users (UC10, UC12). Customer information viewing functionalities to support UC5 and UC6 are provided through a connection with the \emph{Customer Information} facade. The \emph{SAB App Functionality} also connects with the \emph{Transaction Processing System} to provide the functionality to issue transfers (UC9). Note that to issue transfers, the \emph{Transaction Processing System} does not need to reply directly to the user. Replies of failed transactions are managed by the customer's notification inbox.

By adding this \emph{SAB App Functionality} component we localize modifications and prevent ripple effects by encapsulating common functionalities. This way the system can be extended easily with future apps like SAB Mobile.

We will rearrange the previous design so that \emph{SAB Online} is only connected to \emph{SAB App Functionality} for these functionalities. The \emph{ATM System} will also use this new \emph{SAB App Functionality} component for the mentioned functionalities. Note that the \emph{ATM System} is still directly connected with the \emph{Transaction Processing System} to provide the possibility of handling cash withdrawals and deposits. We anticipated expected changes, and in the future \emph{SAB Mobile} will also be able to use the \emph{SAB App Functionality} for the required functionalities.



Requirements can be divided over relevant components as follows:
\begin{itemize}

	\item \emph{SAB App Functionality}
	\begin{itemize}
		\item M1: Anticipate future integration of SAB Mobile
		\item UC5: Consult bank account overview
		\item UC6: Consult transaction history of account
		\item UC9: Issue transfer between two accounts
	\end{itemize}
	
	
	\item \emph{Standing Order Module}
	\begin{itemize}
		 \item UC10: Set up standing order
 		\item UC12: Cancel standing order
	\end{itemize}
	
	
	\item \emph{Customer Information}
	\begin{itemize}
		\item UC5: Consult bank account overview
		\item UC6: Consult transaction history of account
	\end{itemize}

	
	\item \emph{Transaction Processing System}
	\begin{itemize}
		\item UC9: Issue transfer between two accounts
	\end{itemize}
	
	
	

\end{itemize}
